package org.jiopi.module.mailsender;

import org.junit.Test;
import static org.junit.Assert.assertArrayEquals;

public class MailImplTestCase {

	@Test public void parseEmailAddress_Right(){
		{
			String[] emailAddress = MailImpl.parseEmailAddress("test@test.com");
			String[] expected = new String[]{"test@test.com",null};
			assertArrayEquals(expected,emailAddress);
		}
		
		{
			String[] emailAddress = MailImpl.parseEmailAddress("test<test@test.com>");
			String[] expected = new String[]{"test@test.com","test"};
			assertArrayEquals(expected,emailAddress);
		}
	}
}
